﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SamplingReport.aspx.cs"
    Inherits="PPAP.Web.Part.SamplingReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style media="print">
        .Noprint
        {
            display: none;
        }
        UNKNOWN
        {
            page-break-after: always;
        }
    </style>
</head>
<body style="font-family: Arial, Helvetica, sans-serif;" bgcolor="#F2F2F2">
    <form id="form1" runat="server">
    
    <div>
        <table width="100%" cellpadding="3" style="margin-top: 15px;">
            <tr>
                <td style="width: 15%; font-weight: bold; color: #2E8AC5;">
                    Sampling report no.
                </td>
                <td style="width: 35%;">
                    <asp:Label ID="lblSamplingReportNo" runat="server" Text="Label"></asp:Label>
                </td>
                <td style="width: 20%; font-weight: bold; color: #2E8AC5;">
                    Quality engineer
                </td>
                <td style="width: 30%;">
                    <asp:Label ID="lblQe" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Result
                </td>
                <td>
                    
                    <asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
                    
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Quality manager
                </td>
                <td>
                    <asp:Label ID="lblQM" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Supplier
                </td>
                <td>
                    <asp:Label ID="lblSupplier" runat="server" Text="Label"></asp:Label>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Quality VP
                </td>
                <td>
                    <asp:Label ID="lblQVP" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="4" 
                    style="font-weight: bold; color: #2E8AC5; height: 35px; vertical-align: bottom;">
                    Decision text
                </td>
            </tr>
           <tr>
                <td colspan="4">
                <div  style="border: 1pt solid #2E8AC5; padding:15px 5px;  width:850px;word-wrap : break-word;word-break: break-all; overflow:hidden; " runat="server" id="lblDecision"></div>
                    <asp:TextBox ID="lblDecision2" Visible="false" runat="server" Height="85px"  
                        TextMode="MultiLine" 
                        onpropertychange="if(this.scrollHeight >= this.style.posHeight) this.style.posHeight=this.scrollHeight"  
                        style="word-wrap : break-word;word-break: break-all; overflow:hidden; " 
                        Width="100%" AutoPostBack="True" ontextchanged="lblDecision2_TextChanged"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" 
                    style="font-weight: bold; color: #2E8AC5; height: 35px; vertical-align: bottom;">
                    Explanations
                </td>
            </tr>
            <tr>
                <td colspan="4">
                 <div  style="border: 1pt solid #2E8AC5; padding:15px 5px;  width:850px;word-wrap : break-word;word-break: break-all; overflow:hidden; " runat="server" id="lblExplanations"></div>

                    <asp:TextBox ID="lblExplanations2" Visible="false" runat="server" 
                        Height="85px"  TextMode="MultiLine"  
                        onpropertychange="if(this.scrollHeight >= this.style.posHeight) this.style.posHeight=this.scrollHeight"  style="word-wrap : break-word;word-break: break-all; overflow:hidden; "
                        Width="100%" AutoPostBack="True" ontextchanged="lblDecision2_TextChanged"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" align="center">
                    <asp:Button ID="btnSubmit" runat="server" CssClass="button" OnClick="btnSubmit_Click"
                        OnClientClick="return confirm('Are you sure you want to submit?');" Text="Save"
                        Visible="False" />
                    <input type="button" value="Print" class="button" onclick="print()" />
                </td>
            </tr>
        </table>
    </div>
    <script language="javascript" type="text/javascript">
        function print() {
            url = "SampleReportPrint.aspx?rid=<%=rid %>";
            url = "Report.aspx?rid=<%=rid %>";
//            PopUpWindow(url, 230, 60, 880, 720);
            open(url, 'newwindow', 'height=720,width=910,top=0,left=230,toolbar=yes,menubar=yes,scrollbars=yes,resizable=no,location=no,status=no');
        }
        var lblDecision2 = document.getElementById("lblDecision2");
        sy(lblDecision2);

        var lblExplanations2 = document.getElementById("lblExplanations2");
        sy(lblExplanations2);

        function sy(kj) {
            if (kj.scrollHeight >= kj.style.posHeight) {
                kj.style.posHeight = kj.scrollHeight;
            }
        }
    </script>
    </form>
</body>
</html>
